Socket
Socket
Sign inDemoInstall

nuke-helper

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-helper

辅助函数


Version published
Weekly downloads
72
increased by323.53%
Maintainers
2
Weekly downloads
 
Created
Source

Helper

  • category: Components
  • chinese: 辅助函数
  • type: 基本

API

calcTextSize

解析固定字号,<Text style={{fontSize: 28}}>123</Text> 希望字号被解析为:

web: 14px;
native iOS: 14 dp;
native android: 14 pt; 
const { calcTextSize } = Helper;
let style = {fontSize: 28};
calcTextSize(style);

hairLine for web

const { hairLine } = Helper;
hairLine.detect() // 是否支持 hairline,返回 true 或 false
hairLine.fixBorder({ borderWidth: 1 }) // ==> {"borderWidth":"0.5px"}

Keywords

FAQs

Package last updated on 26 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc